{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "os.chdir('../')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import DeepPurpose.models as models\n",
    "from DeepPurpose.utils import *\n",
    "from DeepPurpose.dataset import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Beginning Processing...\n",
      "Beginning to extract zip file...\n",
      "Default set to logspace (nM -> p) for easier regression\n",
      "Done!\n",
      "in total: 30056 drug-target pairs\n",
      "encoding drug...\n",
      "unique drugs: 68\n",
      "drug encoding finished...\n",
      "encoding protein...\n",
      "unique target sequence: 379\n",
      "protein encoding finished...\n",
      "splitting dataset...\n",
      "Done.\n",
      "cost about 6 seconds\n"
     ]
    }
   ],
   "source": [
    "from time import time\n",
    "\n",
    "t1 = time()\n",
    "X_drug, X_target, y = load_process_DAVIS('./data/', binary=False)\n",
    "\n",
    "drug_encoding = 'MPNN'\n",
    "target_encoding = 'CNN'\n",
    "train, val, test = data_process(X_drug, X_target, y, \n",
    "                                drug_encoding, target_encoding, \n",
    "                                split_method='random',frac=[0.7,0.1,0.2])\n",
    "\n",
    "# use the parameters setting provided in the paper: https://arxiv.org/abs/1801.10193\n",
    "config = generate_config(drug_encoding = drug_encoding, \n",
    "                         target_encoding = target_encoding, \n",
    "                         cls_hidden_dims = [1024,1024,512], \n",
    "                         train_epoch = 100, \n",
    "                         test_every_X_epoch = 10, \n",
    "                         LR = 0.001, \n",
    "                         batch_size = 128,\n",
    "                         hidden_dim_drug = 128,\n",
    "                         mpnn_hidden_size = 128,\n",
    "                         mpnn_depth = 3, \n",
    "                         cnn_target_filters = [32,64,96],\n",
    "                         cnn_target_kernels = [4,8,12]\n",
    "                        )\n",
    "model = models.model_initialize(**config)\n",
    "t2 = time()\n",
    "print(\"cost about \" + str(int(t2-t1)) + \" seconds\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Let's use CPU/s!\n",
      "--- Data Preparation ---\n",
      "--- Go for Training ---\n",
      "Training at Epoch 1 iteration 0 with loss 29.46883. Total time 0.0025 hours\n",
      "Training at Epoch 1 iteration 100 with loss 0.7060796. Total time 0.15722222222222224 hours\n",
      "Validation at Epoch 1 , MSE: 0.7517753429191877 , Pearson Correlation: 0.2670847301699022 with p-value: 2.880074197423731e-50 , Concordance Index: 0.6096094398032128\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 0 Testing MSE: 0.8047580315034151 , Pearson Correlation: 0.1615117446931151 with p-value: 2.0500798959336846e-36 , Concordance Index: 0.5623092001548462\n",
      "Training at Epoch 2 iteration 0 with loss 0.5947704. Total time 0.2863888888888889 hours\n",
      "Training at Epoch 2 iteration 100 with loss 0.87183046. Total time 0.4552777777777778 hours\n",
      "Validation at Epoch 2 , MSE: 0.8569167912585558 , Pearson Correlation: 0.38709377702251907 with p-value: 4.821730131844154e-108 , Concordance Index: 0.6986598489332256\n",
      "Training at Epoch 3 iteration 0 with loss 0.89327025. Total time 0.5608333333333333 hours\n",
      "Training at Epoch 3 iteration 100 with loss 0.52375126. Total time 0.6988888888888889 hours\n",
      "Validation at Epoch 3 , MSE: 0.635419179890948 , Pearson Correlation: 0.4872290920626684 with p-value: 4.91286581363606e-179 , Concordance Index: 0.7464885665818117\n",
      "Training at Epoch 4 iteration 0 with loss 0.6749754. Total time 0.8008333333333333 hours\n",
      "Training at Epoch 4 iteration 100 with loss 0.7612959. Total time 0.9352777777777778 hours\n",
      "Validation at Epoch 4 , MSE: 0.5964014418683626 , Pearson Correlation: 0.5209151529662155 with p-value: 8.85252404735648e-209 , Concordance Index: 0.7643114096558643\n",
      "Training at Epoch 5 iteration 0 with loss 0.49107888. Total time 1.0363888888888888 hours\n",
      "Training at Epoch 5 iteration 100 with loss 0.56140804. Total time 1.1719444444444445 hours\n",
      "Validation at Epoch 5 , MSE: 0.5911818190510719 , Pearson Correlation: 0.5525131311468032 with p-value: 6.720185095085701e-240 , Concordance Index: 0.7784308505371825\n",
      "Training at Epoch 6 iteration 0 with loss 0.43258718. Total time 1.2691666666666668 hours\n",
      "Training at Epoch 6 iteration 100 with loss 0.68392307. Total time 1.4091666666666667 hours\n",
      "Validation at Epoch 6 , MSE: 0.5531170221882854 , Pearson Correlation: 0.566189624253369 with p-value: 1.95205204621104e-254 , Concordance Index: 0.7897300555994377\n",
      "Training at Epoch 7 iteration 0 with loss 0.5445415. Total time 1.538888888888889 hours\n",
      "Training at Epoch 7 iteration 100 with loss 0.7730487. Total time 1.7227777777777777 hours\n",
      "Validation at Epoch 7 , MSE: 0.5677889286759984 , Pearson Correlation: 0.5755392961626511 with p-value: 8.980807549880806e-265 , Concordance Index: 0.7905179526557697\n",
      "Training at Epoch 8 iteration 0 with loss 0.63894635. Total time 1.8480555555555556 hours\n",
      "Training at Epoch 8 iteration 100 with loss 0.6792902. Total time 2.0169444444444444 hours\n",
      "Validation at Epoch 8 , MSE: 0.5489072601014807 , Pearson Correlation: 0.584637898377622 with p-value: 3.697965593850639e-275 , Concordance Index: 0.7900246644121796\n",
      "Training at Epoch 9 iteration 0 with loss 0.73479134. Total time 2.140277777777778 hours\n",
      "Training at Epoch 9 iteration 100 with loss 0.6015621. Total time 2.3158333333333334 hours\n",
      "Validation at Epoch 9 , MSE: 0.5256063112492585 , Pearson Correlation: 0.6020459090047969 with p-value: 5.676528602543141e-296 , Concordance Index: 0.7988325658249377\n",
      "Training at Epoch 10 iteration 0 with loss 0.5236869. Total time 2.446388888888889 hours\n",
      "Training at Epoch 10 iteration 100 with loss 0.55687207. Total time 2.6225 hours\n",
      "Validation at Epoch 10 , MSE: 0.555347388252122 , Pearson Correlation: 0.617234569574181 with p-value: 3.268632346e-315 , Concordance Index: 0.8080611483803116\n",
      "Training at Epoch 11 iteration 0 with loss 0.74413854. Total time 2.7552777777777777 hours\n",
      "Training at Epoch 11 iteration 100 with loss 0.5300591. Total time 2.9291666666666667 hours\n",
      "Validation at Epoch 11 , MSE: 0.48007006716708234 , Pearson Correlation: 0.6439111404743596 with p-value: 0.0 , Concordance Index: 0.8148314305139043\n",
      "Training at Epoch 12 iteration 0 with loss 0.39793915. Total time 3.045 hours\n",
      "Training at Epoch 12 iteration 100 with loss 0.80667484. Total time 3.2041666666666666 hours\n",
      "Validation at Epoch 12 , MSE: 0.5251465694631927 , Pearson Correlation: 0.64460803679796 with p-value: 0.0 , Concordance Index: 0.8182169016129778\n",
      "Training at Epoch 13 iteration 0 with loss 0.42844322. Total time 3.326111111111111 hours\n",
      "Training at Epoch 13 iteration 100 with loss 0.59342694. Total time 3.477222222222222 hours\n",
      "Validation at Epoch 13 , MSE: 0.5462537808084 , Pearson Correlation: 0.6324190064609183 with p-value: 0.0 , Concordance Index: 0.8151790645125093\n",
      "Training at Epoch 14 iteration 0 with loss 0.6084962. Total time 3.5947222222222224 hours\n",
      "Training at Epoch 14 iteration 100 with loss 0.4241351. Total time 3.7480555555555557 hours\n",
      "Validation at Epoch 14 , MSE: 0.460508428178199 , Pearson Correlation: 0.6550138964093608 with p-value: 0.0 , Concordance Index: 0.8233944479770121\n",
      "Training at Epoch 15 iteration 0 with loss 0.361272. Total time 3.8494444444444444 hours\n",
      "Training at Epoch 15 iteration 100 with loss 0.5250571. Total time 3.9883333333333333 hours\n",
      "Validation at Epoch 15 , MSE: 0.49627319389280417 , Pearson Correlation: 0.6419841315623034 with p-value: 0.0 , Concordance Index: 0.8167566187973184\n",
      "Training at Epoch 16 iteration 0 with loss 0.6810189. Total time 4.088333333333333 hours\n",
      "Training at Epoch 16 iteration 100 with loss 0.6423906. Total time 4.233333333333333 hours\n",
      "Validation at Epoch 16 , MSE: 0.4556221103926811 , Pearson Correlation: 0.6559468768950226 with p-value: 0.0 , Concordance Index: 0.8237363614161465\n",
      "Training at Epoch 17 iteration 0 with loss 0.47531137. Total time 4.341666666666667 hours\n",
      "Training at Epoch 17 iteration 100 with loss 0.52565575. Total time 4.4825 hours\n",
      "Validation at Epoch 17 , MSE: 0.46958068340572834 , Pearson Correlation: 0.6673320982084464 with p-value: 0.0 , Concordance Index: 0.8258641895177349\n",
      "Training at Epoch 18 iteration 0 with loss 0.6785476. Total time 4.595277777777778 hours\n",
      "Training at Epoch 18 iteration 100 with loss 0.34550858. Total time 4.751666666666667 hours\n",
      "Validation at Epoch 18 , MSE: 0.44388849513608847 , Pearson Correlation: 0.6701700506003445 with p-value: 0.0 , Concordance Index: 0.8294450397248851\n",
      "Training at Epoch 19 iteration 0 with loss 0.34042937. Total time 4.856111111111111 hours\n",
      "Training at Epoch 19 iteration 100 with loss 0.47827458. Total time 4.995555555555556 hours\n",
      "Validation at Epoch 19 , MSE: 0.4628641584270211 , Pearson Correlation: 0.659207647655476 with p-value: 0.0 , Concordance Index: 0.8223040213332864\n",
      "Training at Epoch 20 iteration 0 with loss 0.7018825. Total time 5.095277777777778 hours\n",
      "Training at Epoch 20 iteration 100 with loss 0.49276745. Total time 5.229166666666667 hours\n",
      "Validation at Epoch 20 , MSE: 0.4644872748488797 , Pearson Correlation: 0.6782779879531817 with p-value: 0.0 , Concordance Index: 0.8248938946228941\n",
      "Training at Epoch 21 iteration 0 with loss 0.28159654. Total time 5.340277777777778 hours\n",
      "Training at Epoch 21 iteration 100 with loss 0.5010124. Total time 5.494166666666667 hours\n",
      "Validation at Epoch 21 , MSE: 0.4690106195807031 , Pearson Correlation: 0.676823063917229 with p-value: 0.0 , Concordance Index: 0.8305363464546832\n",
      "Training at Epoch 22 iteration 0 with loss 0.46382958. Total time 5.601388888888889 hours\n",
      "Training at Epoch 22 iteration 100 with loss 0.45210052. Total time 5.7475 hours\n",
      "Validation at Epoch 22 , MSE: 0.39511873247865364 , Pearson Correlation: 0.713833001488571 with p-value: 0.0 , Concordance Index: 0.841963163997439\n",
      "Training at Epoch 23 iteration 0 with loss 0.37147105. Total time 5.879444444444444 hours\n",
      "Training at Epoch 23 iteration 100 with loss 0.39484352. Total time 6.035277777777778 hours\n",
      "Validation at Epoch 23 , MSE: 0.42629993258339954 , Pearson Correlation: 0.7192607312141293 with p-value: 0.0 , Concordance Index: 0.8439105744541816\n",
      "Training at Epoch 24 iteration 0 with loss 0.44722536. Total time 6.1563888888888885 hours\n",
      "Training at Epoch 24 iteration 100 with loss 0.3431129. Total time 6.322222222222222 hours\n",
      "Validation at Epoch 24 , MSE: 0.533160692314166 , Pearson Correlation: 0.6954216406321454 with p-value: 0.0 , Concordance Index: 0.822027234263511\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Training at Epoch 25 iteration 0 with loss 0.51561993. Total time 6.435555555555555 hours\n",
      "Training at Epoch 25 iteration 100 with loss 0.3576431. Total time 6.568333333333333 hours\n",
      "Validation at Epoch 25 , MSE: 0.3808393559844777 , Pearson Correlation: 0.7281011189252609 with p-value: 0.0 , Concordance Index: 0.8450353244547316\n",
      "Training at Epoch 26 iteration 0 with loss 0.34625256. Total time 6.666111111111111 hours\n",
      "Training at Epoch 26 iteration 100 with loss 0.4938168. Total time 6.797777777777778 hours\n",
      "Validation at Epoch 26 , MSE: 0.4038114853360873 , Pearson Correlation: 0.736690284963311 with p-value: 0.0 , Concordance Index: 0.8538986712900521\n",
      "Training at Epoch 27 iteration 0 with loss 0.5388996. Total time 6.898333333333333 hours\n",
      "Training at Epoch 27 iteration 100 with loss 0.37219703. Total time 7.063055555555556 hours\n",
      "Validation at Epoch 27 , MSE: 0.37747449433855873 , Pearson Correlation: 0.7334516544440817 with p-value: 0.0 , Concordance Index: 0.8493143029388274\n",
      "Training at Epoch 28 iteration 0 with loss 0.3948882. Total time 7.214166666666666 hours\n",
      "Training at Epoch 28 iteration 100 with loss 0.51348203. Total time 7.375555555555556 hours\n",
      "Validation at Epoch 28 , MSE: 0.3378716161569206 , Pearson Correlation: 0.762845058759619 with p-value: 0.0 , Concordance Index: 0.8562262789300794\n",
      "Training at Epoch 29 iteration 0 with loss 0.36911985. Total time 7.514166666666667 hours\n",
      "Training at Epoch 29 iteration 100 with loss 0.5125948. Total time 7.68 hours\n",
      "Validation at Epoch 29 , MSE: 0.3384284394224694 , Pearson Correlation: 0.7683889507796817 with p-value: 0.0 , Concordance Index: 0.8572421182791677\n",
      "Training at Epoch 30 iteration 0 with loss 0.3007713. Total time 7.831666666666667 hours\n",
      "Training at Epoch 30 iteration 100 with loss 0.28587264. Total time 8.012222222222222 hours\n",
      "Validation at Epoch 30 , MSE: 0.32152657338196616 , Pearson Correlation: 0.7757415709343771 with p-value: 0.0 , Concordance Index: 0.8666216355959613\n",
      "Training at Epoch 31 iteration 0 with loss 0.24705425. Total time 8.170833333333333 hours\n",
      "Training at Epoch 31 iteration 100 with loss 0.2467531. Total time 8.375 hours\n",
      "Validation at Epoch 31 , MSE: 0.3112682554064079 , Pearson Correlation: 0.7826589831105981 with p-value: 0.0 , Concordance Index: 0.8620245059966865\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 30 Testing MSE: 0.34726333039827656 , Pearson Correlation: 0.7536359235018006 with p-value: 0.0 , Concordance Index: 0.838876159970992\n",
      "Training at Epoch 32 iteration 0 with loss 0.43338037. Total time 8.571111111111112 hours\n",
      "Training at Epoch 32 iteration 100 with loss 0.17815804. Total time 8.746944444444445 hours\n",
      "Validation at Epoch 32 , MSE: 0.33561177864985625 , Pearson Correlation: 0.7622455248411317 with p-value: 0.0 , Concordance Index: 0.8565376093781972\n",
      "Training at Epoch 33 iteration 0 with loss 0.48565662. Total time 8.874444444444444 hours\n",
      "Training at Epoch 33 iteration 100 with loss 0.25703678. Total time 9.061944444444444 hours\n",
      "Validation at Epoch 33 , MSE: 0.32673288024189234 , Pearson Correlation: 0.7876129069955069 with p-value: 0.0 , Concordance Index: 0.8725835586720381\n",
      "Training at Epoch 34 iteration 0 with loss 0.32866058. Total time 9.168611111111112 hours\n",
      "Training at Epoch 34 iteration 100 with loss 0.36561865. Total time 9.323888888888888 hours\n",
      "Validation at Epoch 34 , MSE: 0.33097605008319714 , Pearson Correlation: 0.7944874420124103 with p-value: 0.0 , Concordance Index: 0.872216782801358\n",
      "Training at Epoch 35 iteration 0 with loss 0.37996617. Total time 9.436111111111112 hours\n",
      "Training at Epoch 35 iteration 100 with loss 0.27713895. Total time 9.583055555555555 hours\n",
      "Validation at Epoch 35 , MSE: 0.331334248824305 , Pearson Correlation: 0.79201023686626 with p-value: 0.0 , Concordance Index: 0.8658383589915094\n",
      "Training at Epoch 36 iteration 0 with loss 0.33691818. Total time 9.69 hours\n",
      "Training at Epoch 36 iteration 100 with loss 0.32203883. Total time 9.856111111111112 hours\n",
      "Validation at Epoch 36 , MSE: 0.29372478052168255 , Pearson Correlation: 0.8084235605918798 with p-value: 0.0 , Concordance Index: 0.8719859802288664\n",
      "Training at Epoch 37 iteration 0 with loss 0.18176092. Total time 9.9675 hours\n",
      "Training at Epoch 37 iteration 100 with loss 0.32582822. Total time 10.1225 hours\n",
      "Validation at Epoch 37 , MSE: 0.28622213593996026 , Pearson Correlation: 0.8032979752195278 with p-value: 0.0 , Concordance Index: 0.8695175588172523\n",
      "Training at Epoch 38 iteration 0 with loss 0.2715738. Total time 10.243055555555555 hours\n",
      "Training at Epoch 38 iteration 100 with loss 0.1969629. Total time 10.393611111111111 hours\n",
      "Validation at Epoch 38 , MSE: 0.2775494981876474 , Pearson Correlation: 0.8086952858286247 with p-value: 0.0 , Concordance Index: 0.8771531855815499\n",
      "Training at Epoch 39 iteration 0 with loss 0.36192638. Total time 10.50361111111111 hours\n",
      "Training at Epoch 39 iteration 100 with loss 0.28904724. Total time 10.650277777777777 hours\n",
      "Validation at Epoch 39 , MSE: 0.31963853445311075 , Pearson Correlation: 0.7987267702083077 with p-value: 0.0 , Concordance Index: 0.8627235143597044\n",
      "Training at Epoch 40 iteration 0 with loss 0.23435101. Total time 10.758611111111112 hours\n",
      "Training at Epoch 40 iteration 100 with loss 0.29689053. Total time 10.908333333333333 hours\n",
      "Validation at Epoch 40 , MSE: 0.2665710958402761 , Pearson Correlation: 0.8170602879231499 with p-value: 0.0 , Concordance Index: 0.8799261167742205\n",
      "Training at Epoch 41 iteration 0 with loss 0.23326679. Total time 11.012777777777778 hours\n",
      "Training at Epoch 41 iteration 100 with loss 0.2593476. Total time 11.167777777777777 hours\n",
      "Validation at Epoch 41 , MSE: 0.2742937626012636 , Pearson Correlation: 0.8124817581765178 with p-value: 0.0 , Concordance Index: 0.8729408736174398\n",
      "Training at Epoch 42 iteration 0 with loss 0.23925406. Total time 11.270555555555555 hours\n",
      "Training at Epoch 42 iteration 100 with loss 0.29589406. Total time 11.435 hours\n",
      "Validation at Epoch 42 , MSE: 0.2742616626109009 , Pearson Correlation: 0.8117212171233013 with p-value: 0.0 , Concordance Index: 0.8817419543631367\n",
      "Training at Epoch 43 iteration 0 with loss 0.29123777. Total time 11.558055555555555 hours\n",
      "Training at Epoch 43 iteration 100 with loss 0.18232934. Total time 11.73611111111111 hours\n",
      "Validation at Epoch 43 , MSE: 0.2535251601699528 , Pearson Correlation: 0.8277372884507589 with p-value: 0.0 , Concordance Index: 0.8837085066919544\n",
      "Training at Epoch 44 iteration 0 with loss 0.22416411. Total time 11.864722222222222 hours\n",
      "Training at Epoch 44 iteration 100 with loss 0.15845068. Total time 12.140277777777778 hours\n",
      "Validation at Epoch 44 , MSE: 0.26276080242825955 , Pearson Correlation: 0.8303010091505805 with p-value: 0.0 , Concordance Index: 0.8876257698002865\n",
      "Training at Epoch 45 iteration 0 with loss 0.21066591. Total time 12.324722222222222 hours\n",
      "Training at Epoch 45 iteration 100 with loss 0.18455954. Total time 12.601944444444445 hours\n",
      "Validation at Epoch 45 , MSE: 0.26360626115526425 , Pearson Correlation: 0.8205977512054685 with p-value: 0.0 , Concordance Index: 0.8749952145319813\n",
      "Training at Epoch 46 iteration 0 with loss 0.28530467. Total time 12.769722222222223 hours\n",
      "Training at Epoch 46 iteration 100 with loss 0.17765209. Total time 13.0575 hours\n",
      "Validation at Epoch 46 , MSE: 0.2582503583258465 , Pearson Correlation: 0.8274215638810543 with p-value: 0.0 , Concordance Index: 0.884122367167509\n",
      "Training at Epoch 47 iteration 0 with loss 0.29483953. Total time 13.252777777777778 hours\n",
      "Training at Epoch 47 iteration 100 with loss 0.20077385. Total time 13.4675 hours\n",
      "Validation at Epoch 47 , MSE: 0.285077390939771 , Pearson Correlation: 0.8204319317076914 with p-value: 0.0 , Concordance Index: 0.8791424001267324\n",
      "Training at Epoch 48 iteration 0 with loss 0.30193067. Total time 13.620555555555555 hours\n",
      "Training at Epoch 48 iteration 100 with loss 0.33783507. Total time 13.834166666666667 hours\n",
      "Validation at Epoch 48 , MSE: 0.258671296116228 , Pearson Correlation: 0.8264743329751221 with p-value: 0.0 , Concordance Index: 0.8792957551248513\n",
      "Training at Epoch 49 iteration 0 with loss 0.15000044. Total time 13.983055555555556 hours\n",
      "Training at Epoch 49 iteration 100 with loss 0.22975208. Total time 14.187777777777777 hours\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Validation at Epoch 49 , MSE: 0.2688038162828265 , Pearson Correlation: 0.8168025124832913 with p-value: 0.0 , Concordance Index: 0.875487402667981\n",
      "Training at Epoch 50 iteration 0 with loss 0.22450684. Total time 14.334166666666667 hours\n",
      "Training at Epoch 50 iteration 100 with loss 0.18252146. Total time 14.536666666666667 hours\n",
      "Validation at Epoch 50 , MSE: 0.2599455720414549 , Pearson Correlation: 0.8266730160178569 with p-value: 0.0 , Concordance Index: 0.8792660522199071\n",
      "Training at Epoch 51 iteration 0 with loss 0.2945141. Total time 14.695277777777777 hours\n",
      "Training at Epoch 51 iteration 100 with loss 0.27376124. Total time 14.89638888888889 hours\n",
      "Validation at Epoch 51 , MSE: 0.2652107835358866 , Pearson Correlation: 0.8297527179979158 with p-value: 0.0 , Concordance Index: 0.884653279090695\n",
      "Training at Epoch 52 iteration 0 with loss 0.18647464. Total time 15.043888888888889 hours\n",
      "Training at Epoch 52 iteration 100 with loss 0.10718882. Total time 15.243055555555555 hours\n",
      "Validation at Epoch 52 , MSE: 0.34538177163154565 , Pearson Correlation: 0.8300446868458116 with p-value: 0.0 , Concordance Index: 0.883911806574683\n",
      "Training at Epoch 53 iteration 0 with loss 0.27261615. Total time 15.388333333333334 hours\n",
      "Training at Epoch 53 iteration 100 with loss 0.32466948. Total time 15.598888888888888 hours\n",
      "Validation at Epoch 53 , MSE: 0.31438995424744276 , Pearson Correlation: 0.8233859811385891 with p-value: 0.0 , Concordance Index: 0.8785934464390618\n",
      "Training at Epoch 54 iteration 0 with loss 0.31412008. Total time 15.746944444444445 hours\n",
      "Training at Epoch 54 iteration 100 with loss 0.16126902. Total time 15.94361111111111 hours\n",
      "Validation at Epoch 54 , MSE: 0.24448197497426272 , Pearson Correlation: 0.8343323596440968 with p-value: 0.0 , Concordance Index: 0.8834572421182791\n",
      "Training at Epoch 55 iteration 0 with loss 0.13120854. Total time 16.0925 hours\n",
      "Training at Epoch 55 iteration 100 with loss 0.15268648. Total time 16.29277777777778 hours\n",
      "Validation at Epoch 55 , MSE: 0.26180221427729494 , Pearson Correlation: 0.8337255880493287 with p-value: 0.0 , Concordance Index: 0.8878757142448531\n",
      "Training at Epoch 56 iteration 0 with loss 0.28819543. Total time 16.4425 hours\n",
      "Training at Epoch 56 iteration 100 with loss 0.16464545. Total time 16.657222222222224 hours\n",
      "Validation at Epoch 56 , MSE: 0.27651693196808524 , Pearson Correlation: 0.8243825140173426 with p-value: 0.0 , Concordance Index: 0.8813027914130002\n",
      "Training at Epoch 57 iteration 0 with loss 0.15693912. Total time 16.80527777777778 hours\n",
      "Training at Epoch 57 iteration 100 with loss 0.27736202. Total time 17.0 hours\n",
      "Validation at Epoch 57 , MSE: 0.24400021175761735 , Pearson Correlation: 0.8445202823629989 with p-value: 0.0 , Concordance Index: 0.8854743993962609\n",
      "Training at Epoch 58 iteration 0 with loss 0.27358857. Total time 17.148055555555555 hours\n",
      "Training at Epoch 58 iteration 100 with loss 0.1587878. Total time 17.34638888888889 hours\n",
      "Validation at Epoch 58 , MSE: 0.2432258580633402 , Pearson Correlation: 0.8361769294605703 with p-value: 0.0 , Concordance Index: 0.887348762708993\n",
      "Training at Epoch 59 iteration 0 with loss 0.16271058. Total time 17.496944444444445 hours\n",
      "Training at Epoch 59 iteration 100 with loss 0.19284382. Total time 17.701666666666668 hours\n",
      "Validation at Epoch 59 , MSE: 0.22698371154416785 , Pearson Correlation: 0.8463188397431294 with p-value: 0.0 , Concordance Index: 0.8890075049339825\n",
      "Training at Epoch 60 iteration 0 with loss 0.20969456. Total time 17.85388888888889 hours\n",
      "Training at Epoch 60 iteration 100 with loss 0.14949144. Total time 18.053333333333335 hours\n",
      "Validation at Epoch 60 , MSE: 0.2396781354183015 , Pearson Correlation: 0.8376207424965626 with p-value: 0.0 , Concordance Index: 0.8876090481649105\n",
      "Training at Epoch 61 iteration 0 with loss 0.14804085. Total time 18.199166666666667 hours\n",
      "Training at Epoch 61 iteration 100 with loss 0.17432171. Total time 18.392777777777777 hours\n",
      "Validation at Epoch 61 , MSE: 0.23612849165377892 , Pearson Correlation: 0.8409097956455415 with p-value: 0.0 , Concordance Index: 0.889657008455427\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 60 Testing MSE: 0.27677603779094584 , Pearson Correlation: 0.8148875102553061 with p-value: 0.0 , Concordance Index: 0.8606265932559967\n",
      "Training at Epoch 62 iteration 0 with loss 0.14715335. Total time 18.595833333333335 hours\n",
      "Training at Epoch 62 iteration 100 with loss 0.30585665. Total time 18.79138888888889 hours\n",
      "Validation at Epoch 62 , MSE: 0.24088288236523767 , Pearson Correlation: 0.838023246521272 with p-value: 0.0 , Concordance Index: 0.8817122514581927\n",
      "Training at Epoch 63 iteration 0 with loss 0.1746535. Total time 18.9375 hours\n",
      "Training at Epoch 63 iteration 100 with loss 0.2505023. Total time 19.13361111111111 hours\n",
      "Validation at Epoch 63 , MSE: 0.24685916470009558 , Pearson Correlation: 0.8429152578702521 with p-value: 0.0 , Concordance Index: 0.8892904526062649\n",
      "Training at Epoch 64 iteration 0 with loss 0.23231311. Total time 19.281111111111112 hours\n",
      "Training at Epoch 64 iteration 100 with loss 0.151833. Total time 19.481666666666666 hours\n",
      "Validation at Epoch 64 , MSE: 0.24225252142074624 , Pearson Correlation: 0.8523434305170872 with p-value: 0.0 , Concordance Index: 0.8930906642669653\n",
      "Training at Epoch 65 iteration 0 with loss 0.1400775. Total time 19.631944444444443 hours\n",
      "Training at Epoch 65 iteration 100 with loss 0.15301146. Total time 19.83222222222222 hours\n",
      "Validation at Epoch 65 , MSE: 0.24822931389301073 , Pearson Correlation: 0.8444442127736259 with p-value: 0.0 , Concordance Index: 0.8831478918638243\n",
      "Training at Epoch 66 iteration 0 with loss 0.15395223. Total time 19.97972222222222 hours\n",
      "Training at Epoch 66 iteration 100 with loss 0.19836776. Total time 20.177222222222223 hours\n",
      "Validation at Epoch 66 , MSE: 0.24799907926107387 , Pearson Correlation: 0.8375054766629977 with p-value: 0.0 , Concordance Index: 0.8828922268597869\n",
      "Training at Epoch 67 iteration 0 with loss 0.16643724. Total time 20.325833333333332 hours\n",
      "Training at Epoch 67 iteration 100 with loss 0.14739788. Total time 20.54 hours\n",
      "Validation at Epoch 67 , MSE: 0.23461400891040496 , Pearson Correlation: 0.8459706659784988 with p-value: 0.0 , Concordance Index: 0.8877474416997982\n",
      "Training at Epoch 68 iteration 0 with loss 0.14591275. Total time 20.69333333333333 hours\n",
      "Training at Epoch 68 iteration 100 with loss 0.14702453. Total time 20.891666666666666 hours\n",
      "Validation at Epoch 68 , MSE: 0.23587769113820856 , Pearson Correlation: 0.843715109105754 with p-value: 0.0 , Concordance Index: 0.8888853929914345\n",
      "Training at Epoch 69 iteration 0 with loss 0.13620153. Total time 21.038611111111113 hours\n",
      "Training at Epoch 69 iteration 100 with loss 0.22649883. Total time 21.240833333333335 hours\n",
      "Validation at Epoch 69 , MSE: 0.2256869299657209 , Pearson Correlation: 0.8475429945759585 with p-value: 0.0 , Concordance Index: 0.8862988200245984\n",
      "Training at Epoch 70 iteration 0 with loss 0.11437579. Total time 21.388055555555557 hours\n",
      "Training at Epoch 70 iteration 100 with loss 0.15376836. Total time 21.594722222222224 hours\n",
      "Validation at Epoch 70 , MSE: 0.23182368968993694 , Pearson Correlation: 0.8431175856622726 with p-value: 0.0 , Concordance Index: 0.8892312668178948\n",
      "Training at Epoch 71 iteration 0 with loss 0.13792603. Total time 21.744722222222222 hours\n",
      "Training at Epoch 71 iteration 100 with loss 0.11367314. Total time 21.953333333333333 hours\n",
      "Validation at Epoch 71 , MSE: 0.22777745936617225 , Pearson Correlation: 0.8472096688394495 with p-value: 0.0 , Concordance Index: 0.8845791318390939\n",
      "Training at Epoch 72 iteration 0 with loss 0.13882759. Total time 22.106944444444444 hours\n",
      "Training at Epoch 72 iteration 100 with loss 0.0878301. Total time 22.30638888888889 hours\n",
      "Validation at Epoch 72 , MSE: 0.24053782773270146 , Pearson Correlation: 0.840966179091815 with p-value: 0.0 , Concordance Index: 0.8879404005711758\n",
      "Training at Epoch 73 iteration 0 with loss 0.086576656. Total time 22.475277777777777 hours\n",
      "Training at Epoch 73 iteration 100 with loss 0.18389541. Total time 22.683888888888887 hours\n",
      "Validation at Epoch 73 , MSE: 0.22934210609231526 , Pearson Correlation: 0.8481731049198573 with p-value: 0.0 , Concordance Index: 0.8929368692258103\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Training at Epoch 74 iteration 0 with loss 0.10863095. Total time 22.835833333333333 hours\n",
      "Training at Epoch 74 iteration 100 with loss 0.12342718. Total time 23.03388888888889 hours\n",
      "Validation at Epoch 74 , MSE: 0.2507701375386908 , Pearson Correlation: 0.8388915130530998 with p-value: 0.0 , Concordance Index: 0.884177152525517\n",
      "Training at Epoch 75 iteration 0 with loss 0.09480692. Total time 23.184722222222224 hours\n",
      "Training at Epoch 75 iteration 100 with loss 0.20157498. Total time 23.396944444444443 hours\n",
      "Validation at Epoch 75 , MSE: 0.25530628348544954 , Pearson Correlation: 0.8449576641293957 with p-value: 0.0 , Concordance Index: 0.8921711943428067\n",
      "Training at Epoch 76 iteration 0 with loss 0.11792371. Total time 23.57611111111111 hours\n",
      "Training at Epoch 76 iteration 100 with loss 0.14538348. Total time 23.845 hours\n",
      "Validation at Epoch 76 , MSE: 0.2144399367760175 , Pearson Correlation: 0.8558364841266106 with p-value: 0.0 , Concordance Index: 0.8874572333174184\n",
      "Training at Epoch 77 iteration 0 with loss 0.09548406. Total time 24.104444444444443 hours\n",
      "Training at Epoch 77 iteration 100 with loss 0.09861414. Total time 24.43166666666667 hours\n",
      "Validation at Epoch 77 , MSE: 0.25546220281660764 , Pearson Correlation: 0.8314138211311342 with p-value: 0.0 , Concordance Index: 0.8893659199869747\n",
      "Training at Epoch 78 iteration 0 with loss 0.1398777. Total time 24.6075 hours\n",
      "Training at Epoch 78 iteration 100 with loss 0.15806465. Total time 24.816111111111113 hours\n",
      "Validation at Epoch 78 , MSE: 0.23583305297640253 , Pearson Correlation: 0.8433676782358159 with p-value: 0.0 , Concordance Index: 0.890861846288567\n",
      "Training at Epoch 79 iteration 0 with loss 0.07583973. Total time 24.98111111111111 hours\n",
      "Training at Epoch 79 iteration 100 with loss 0.17002356. Total time 25.243055555555557 hours\n",
      "Validation at Epoch 79 , MSE: 0.240648215513365 , Pearson Correlation: 0.839706581421593 with p-value: 0.0 , Concordance Index: 0.8803571389281871\n",
      "Training at Epoch 80 iteration 0 with loss 0.1329512. Total time 25.45388888888889 hours\n",
      "Training at Epoch 80 iteration 100 with loss 0.10646099. Total time 25.740833333333335 hours\n",
      "Validation at Epoch 80 , MSE: 0.22954906689342602 , Pearson Correlation: 0.8455853701959928 with p-value: 0.0 , Concordance Index: 0.8810565873342413\n",
      "Training at Epoch 81 iteration 0 with loss 0.12420165. Total time 25.93638888888889 hours\n",
      "Training at Epoch 81 iteration 100 with loss 0.10845866. Total time 26.20916666666667 hours\n",
      "Validation at Epoch 81 , MSE: 0.2327220853827806 , Pearson Correlation: 0.8440640261164047 with p-value: 0.0 , Concordance Index: 0.8897670192144792\n",
      "Training at Epoch 82 iteration 0 with loss 0.10090961. Total time 26.403333333333332 hours\n",
      "Training at Epoch 82 iteration 100 with loss 0.11465585. Total time 26.653055555555557 hours\n",
      "Validation at Epoch 82 , MSE: 0.23640995489163785 , Pearson Correlation: 0.84064790265932 with p-value: 0.0 , Concordance Index: 0.8837639521145167\n",
      "Training at Epoch 83 iteration 0 with loss 0.14063108. Total time 26.828611111111112 hours\n",
      "Training at Epoch 83 iteration 100 with loss 0.1377556. Total time 27.06888888888889 hours\n",
      "Validation at Epoch 83 , MSE: 0.23815638971019 , Pearson Correlation: 0.8469809785451561 with p-value: 0.0 , Concordance Index: 0.8939645897368763\n",
      "Training at Epoch 84 iteration 0 with loss 0.1024561. Total time 27.24972222222222 hours\n",
      "Training at Epoch 84 iteration 100 with loss 0.06441457. Total time 27.495833333333334 hours\n",
      "Validation at Epoch 84 , MSE: 0.2657404485115638 , Pearson Correlation: 0.8298507115238394 with p-value: 0.0 , Concordance Index: 0.883486284958669\n",
      "Training at Epoch 85 iteration 0 with loss 0.119572274. Total time 27.655 hours\n",
      "Training at Epoch 85 iteration 100 with loss 0.12162981. Total time 27.900555555555556 hours\n",
      "Validation at Epoch 85 , MSE: 0.22801266863622932 , Pearson Correlation: 0.8502210971767327 with p-value: 0.0 , Concordance Index: 0.8968169486975827\n",
      "Training at Epoch 86 iteration 0 with loss 0.11842582. Total time 28.09027777777778 hours\n",
      "Training at Epoch 86 iteration 100 with loss 0.10047383. Total time 28.291944444444443 hours\n",
      "Validation at Epoch 86 , MSE: 0.2246874461201361 , Pearson Correlation: 0.8516852267111761 with p-value: 0.0 , Concordance Index: 0.8966558929463302\n",
      "Training at Epoch 87 iteration 0 with loss 0.086187705. Total time 28.441944444444445 hours\n",
      "Training at Epoch 87 iteration 100 with loss 0.17614749. Total time 28.654444444444444 hours\n",
      "Validation at Epoch 87 , MSE: 0.23672671687359434 , Pearson Correlation: 0.8470136518950229 with p-value: 0.0 , Concordance Index: 0.8913670156941349\n",
      "Training at Epoch 88 iteration 0 with loss 0.11381615. Total time 28.852777777777778 hours\n",
      "Training at Epoch 88 iteration 100 with loss 0.1217925. Total time 29.121388888888887 hours\n",
      "Validation at Epoch 88 , MSE: 0.22700449330394287 , Pearson Correlation: 0.8476921912108217 with p-value: 0.0 , Concordance Index: 0.8832746242582524\n",
      "Training at Epoch 89 iteration 0 with loss 0.13206546. Total time 29.301944444444445 hours\n",
      "Training at Epoch 89 iteration 100 with loss 0.13158026. Total time 29.585 hours\n",
      "Validation at Epoch 89 , MSE: 0.22235349198395957 , Pearson Correlation: 0.8511580857594199 with p-value: 0.0 , Concordance Index: 0.8927832942061734\n",
      "Training at Epoch 90 iteration 0 with loss 0.14732362. Total time 29.763333333333332 hours\n",
      "Training at Epoch 90 iteration 100 with loss 0.08150242. Total time 29.986944444444443 hours\n",
      "Validation at Epoch 90 , MSE: 0.23214157177001896 , Pearson Correlation: 0.8428016131605022 with p-value: 0.0 , Concordance Index: 0.8873982675505665\n",
      "Training at Epoch 91 iteration 0 with loss 0.07259116. Total time 30.1575 hours\n",
      "Training at Epoch 91 iteration 100 with loss 0.12983114. Total time 30.388333333333332 hours\n",
      "Validation at Epoch 91 , MSE: 0.2310021971387384 , Pearson Correlation: 0.8463170550819953 with p-value: 0.0 , Concordance Index: 0.8898372060787545\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 90 Testing MSE: 0.26478965407713145 , Pearson Correlation: 0.8242580468347267 with p-value: 0.0 , Concordance Index: 0.8656583867383137\n",
      "Training at Epoch 92 iteration 0 with loss 0.17746122. Total time 30.58 hours\n",
      "Training at Epoch 92 iteration 100 with loss 0.09560698. Total time 30.712222222222223 hours\n",
      "Validation at Epoch 92 , MSE: 0.22650559396242004 , Pearson Correlation: 0.8469226458317998 with p-value: 0.0 , Concordance Index: 0.8890191660744421\n",
      "Training at Epoch 93 iteration 0 with loss 0.11060917. Total time 30.80666666666667 hours\n",
      "Training at Epoch 93 iteration 100 with loss 0.1579599. Total time 30.97888888888889 hours\n",
      "Validation at Epoch 93 , MSE: 0.21876191177319174 , Pearson Correlation: 0.856582241851206 with p-value: 0.0 , Concordance Index: 0.8941584286943263\n",
      "Training at Epoch 94 iteration 0 with loss 0.1369961. Total time 31.11611111111111 hours\n",
      "Training at Epoch 94 iteration 100 with loss 0.091114365. Total time 31.288611111111113 hours\n",
      "Validation at Epoch 94 , MSE: 0.23290192696671191 , Pearson Correlation: 0.843205342601559 with p-value: 0.0 , Concordance Index: 0.8872495330043279\n",
      "Training at Epoch 95 iteration 0 with loss 0.11446187. Total time 31.426666666666666 hours\n",
      "Training at Epoch 95 iteration 100 with loss 0.116593264. Total time 31.6875 hours\n",
      "Validation at Epoch 95 , MSE: 0.23211070097123118 , Pearson Correlation: 0.8435730708054223 with p-value: 0.0 , Concordance Index: 0.8801912427035364\n",
      "Training at Epoch 96 iteration 0 with loss 0.12119979. Total time 31.85388888888889 hours\n",
      "Training at Epoch 96 iteration 100 with loss 0.10847609. Total time 32.06611111111111 hours\n",
      "Validation at Epoch 96 , MSE: 0.23426921801743947 , Pearson Correlation: 0.8432473576957666 with p-value: 0.0 , Concordance Index: 0.89178197627728\n",
      "Training at Epoch 97 iteration 0 with loss 0.08790504. Total time 32.21722222222222 hours\n",
      "Training at Epoch 97 iteration 100 with loss 0.091278896. Total time 32.43416666666667 hours\n",
      "Validation at Epoch 97 , MSE: 0.22332688551810506 , Pearson Correlation: 0.851000448996911 with p-value: 0.0 , Concordance Index: 0.8894708702511106\n",
      "Training at Epoch 98 iteration 0 with loss 0.07251157. Total time 32.6025 hours\n",
      "Training at Epoch 98 iteration 100 with loss 0.11406933. Total time 32.82055555555556 hours\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Validation at Epoch 98 , MSE: 0.22934280019333014 , Pearson Correlation: 0.8490001436070995 with p-value: 0.0 , Concordance Index: 0.8927241084178033\n",
      "Training at Epoch 99 iteration 0 with loss 0.10924793. Total time 32.97611111111111 hours\n",
      "Training at Epoch 99 iteration 100 with loss 0.11092813. Total time 33.19583333333333 hours\n",
      "Validation at Epoch 99 , MSE: 0.2534271651965403 , Pearson Correlation: 0.8410475570979001 with p-value: 0.0 , Concordance Index: 0.8936499589659869\n",
      "Training at Epoch 100 iteration 0 with loss 0.085313514. Total time 33.37916666666667 hours\n",
      "Training at Epoch 100 iteration 100 with loss 0.06564114. Total time 33.647222222222226 hours\n",
      "Validation at Epoch 100 , MSE: 0.224251314100474 , Pearson Correlation: 0.8503695356178169 with p-value: 0.0 , Concordance Index: 0.8901628379255491\n",
      "--- Go for Testing ---\n",
      "Testing MSE: 0.2711707727221614 , Pearson Correlation: 0.8199559586828618 with p-value: 0.0 , Concordance Index: 0.8541680399479676\n",
      "--- Training Finished ---\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAELCAYAAAA7h+qnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAcsklEQVR4nO3de5RcZZnv8e+vE0BC8JCQ1skASSswKqJy6eHgZfC6EOIF7yMTEJSZOIBLGD1nycjxGEej43EEnaPgxBGNpr0g4hEBUeSigxe0g0kAA5OAJEYidBJAhh5RwnP+eN+aqu5UdXZ1162zf5+1atXe7749tVOpp/fe70URgZmZlVtftwMwM7PuczIwMzMnAzMzczIwMzOcDMzMDJjZ7QAma968eTEwMNDtMMzMppVVq1ZtjYj+8eXTNhkMDAwwPDzc7TDMzKYVSRvrlfs2kZmZORmYmVmHk4GkJ0j6maQ1km6X9IFc/hRJN0taL+lrkvbsZFxmZmXX6SuDR4GXRMRzgCOAEyQdC3wUuDAiDgUeAM7ocFxmZqXW0WQQyX/k2T3yK4CXAJfl8hXAazoZl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p8PiLeVlN+M6lfmTOAT9Tsbg5wdET8dtwx/rpm2xnANaS+ds4AzomIEUl35VVWR8SGXYT9IdJoZCdG7vte0k9yTO8mJaSKecBxEbE+r3cLKSG8CfjwLo5jNoavDKysngs8ERiSNLPyIj1ruIM0BGKtn45PBAD5Ns0NkraR+un/I6kL5qeNX3dXcu+vRwFfi+ogKEQaSetHwAvHbbK+kgjyeveTrkwWYNYkXxlYWVVGx/p+g+UPjJvf6bZOrq56Namb6DPyOjtItYOeMImY5pB6H613C6kyVnOtekM0PjrJY1vJORlYWW3L76eTbuuM9/C4+Xrd+76edDXwuoj4Y6Uwjxvw4CRieiAf50/qLPsTqjGbtZyTge3uHs3ve48r/zHpB/+QiFjB5MwiXQn8V6KQ9BLSbZpf1azXKIYxIuIRSauAN0paGhE78j4XAs8D/u8k4zTbJScD293dR/qL+s2S1gKPAL+KiG2S/ifwaUn9pAHaHyLVDnohcGNEfHkX+74GOBf4gqTPk54VvA/4zbj1fpnfz5a0gvRcYW2DdgrvI9UmulLSRcBsUg2mh6iOv2vWcn6AbLu1SGPX/jXpfvz3ScMSviov+xfg1aSHvV8iJYQPkP5IWl1g398F3gk8H7iSNKLYW0gjWdWutwZYmo97U47hTxvs8xpSG4b9gEuBzwDrgBdEHnParB080pmZmfnKwMzMnAzMzAwnAzMzw8nAzMxwMjAzM5wMzMwMJwMzM8PJwMzMgP8PWLhTSWd951cAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "model.train(train, val, test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "model.save_model('./model_MPNN_CNN_Davis')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
